package com.bwie.es;

import com.baomidou.mybatisplus.annotation.TableField;

import com.bwie.domain.Type;
import com.jhlabs.math.FFT;
import lombok.Data;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

/**
 * @BelongsProject: E-Commerce-Month-01
 * @BelongsPackage: com.bwie.es
 * @Author: asus
 * @CreateTime: 2025-10-30  18:40
 * @Description:
 * @Version: 1.0
 */
@Data
@Document(indexName = "es_prod",shards = 1,replicas = 1)
public class EsProdVo implements Serializable {
    /**
     * 商品id
     */
    @Id
    @Field(type = FieldType.Long)
    private Long prodId;

    /**
     * SPU
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String prodSpu;

    /**
     * 商品分类
     */
    @Field(type = FieldType.Long)
    private Integer prodType;

    /**
     * 商品类型;0实物商品1虚拟商品2卡密/网盘
     */
    @Field(type = FieldType.Integer)
    private Integer prodKind;

    /**
     * 商品名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String prodName;

    /**
     * 商品品牌
     */
    @Field(type = FieldType.Integer)
    private Integer brandId;

    /**
     * 商品状态：0草稿1待审核2已上线3已下线4缺货
     */
    @Field(type = FieldType.Integer)
    private Integer prodStatus;

    /**
     * 商品单位
     */
    @Field(type = FieldType.Integer)
    private Integer unitId;

    /**
     * 商品标签
     */
    @Field(type = FieldType.Integer)
    private Integer tagId;

    /**
     * 供应商
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String supplier;

    /**
     * 缩略图
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String prodImage;

    /**
     * 创建人
     */
    @Field(type = FieldType.Integer)
    private Integer createBy;

    /**
     * 创建时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /**
     * 更新人
     */
    @Field(type = FieldType.Integer)
    private Integer updateBy;

    /**
     * 更新时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /**
     * 删除标识 0未删除 1已删除
     */
    @Field(type = FieldType.Integer)
    private Integer deleteFlag;

    /**
     * 删除时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deleteDate;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String typeName;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String brandName;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String kindName;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String unitName;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String tagName;


    private static final long serialVersionUID = 1L;
}

